@import './theme/default.less';

.vertical-center {
  position: absolute;
  top: 50%;
  transform: translate(0, -50%);
}
@color-bg-warning: @theme-warn-3;
@color-border-warning: @theme-warn-2;
@color-text-warning: @theme-stroke-1;
@color-bg-error: @theme-error-2;
@color-border-error: @theme-error-1;
@color-text-error: @theme-stroke-10;
@color-bg-info: @theme-stroke-9;
@color-text-info: @theme-stroke-1;
@alert-border-radius: 4px;
@close-icon-size: 14px;

.zent-alert {
  box-sizing: border-box;
  width: 100%;
  font-size: 12px;
  line-height: 12px;
  position: relative;

  &.zent-alert-closable {
    .zent-alert-content {
      margin-right: 15px;
    }

    .zent-alert-close-wrapper {
      margin-left: 15px;
      height: 100%;
      width: @close-icon-size;
      position: absolute;
      top: 0;
      right: 15px;
    }

    .zent-alert-close-btn {
      width: @close-icon-size;

      .vertical-center;

      font-family: sans-serif;
      font-size: 18px;
      text-align: center;
      display: inline-block;
      cursor: pointer;
      color: @theme-stroke-4;
    }
  }

  &.zent-alert-size-normal {
    padding: 15px;
  }

  &.zent-alert-size-large {
    padding: 11px 15px 11px 30px;
  }

  &.zent-alert-border-rounded {
    border-radius: @alert-border-radius;
  }

  &.zent-alert-style-info {
    background: @color-bg-info;
    color: @color-text-info;
  }

  &.zent-alert-style-warning {
    background: @color-bg-warning;
    border: 1px solid @color-border-warning;
    color: @color-text-warning;
  }

  &.zent-alert-style-danger {
    background: @color-bg-error;
    border: 1px solid @color-border-error;
    color: @color-text-error;

    .zent-alert-close-btn {
      color: @theme-stroke-10;
    }
  }
}
